//
//  Ugc_ReleaseMagazine_VC_WX.m
//  ZITHER
//
//  Created by weixin on 2018/11/8.
//  Copyright © 2018 weixn. All rights reserved.
//

#import "Ugc_ReleaseMagazine_VC_WX.h"

@interface Ugc_ReleaseMagazine_VC_WX ()

@end

@implementation Ugc_ReleaseMagazine_VC_WX

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setNav];
    [self setUI];
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    self.tabBarController.tabBar.hidden=YES;
    
    
}

-(void)setNav{
    [self.baseNavigationView setHiddenNav:NO VC:self];
//    [self.baseNavigationView NavigationBarStyle:1];
//    self.baseNavigationView.leftButton1.hidden = NO;
//    self.baseNavigationView.navViewStyle.title.text = @"我的点赞";
//    self.baseNavigationView.titleLabel.text = @"";
//    self.baseNavigationView.titleLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:17];
//    [self.baseNavigationView addSubview:self.sendBtn];
//    self.baseNavigationView.bottomLineView.hidden = YES;
}
-(void)setUI{
    
    BaseLab *lab = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, 1, 1) text:@"特邀作者" font:30 textColor:[UIColor whiteColor] isBold:nil numberOfLines:1];
    lab.textColor = [UIColor blackColor];
    lab.font = [UIFont fontWithName:@"PingFangSC-Medium" size:30];
    lab.textAlignment = NSTextAlignmentCenter ;
    [self.view addSubview:lab];
    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.baseNavigationView.mas_bottom).offset(15);
        make.centerX.equalTo(self.view.mas_centerX).offset(0);
    }];

    
    BaseImageV *backImage = [[BaseImageV alloc]initializeFrame:CGRectMake(0, 0, 1, 1) contentMode:2];
    [backImage sd_setImage:kUSER_INFO_MANAGER.avatar];
    [self.view addSubview:backImage];
    [backImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(lab.mas_bottom).offset(26);
        make.left.right.equalTo(self.view).offset(0);
        make.height.mas_equalTo(kScreenW/375*310);
    }];
    
    UIView *viewBack = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 1, 1)];
    viewBack.backgroundColor = [UIColor blackColor];
    viewBack.alpha = 0.7;
    [self.view addSubview:viewBack];
    [viewBack mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(lab.mas_bottom).offset(26);
        make.left.right.equalTo(self.view).offset(0);
        make.height.mas_equalTo(kScreenW/375*310);
    }];
    
    
    
    BaseImageV *userImage = [[BaseImageV alloc]initializeFrame:CGRectMake(0, 0, 1, 1) contentMode:2];
    [userImage setCornerRadiusWithRadius:75 isMasks:YES];
    [userImage sd_setImage:kUSER_INFO_MANAGER.avatar];
    [self.view addSubview:userImage];
    [userImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(backImage.mas_centerX).offset(0);
        make.centerY.equalTo(backImage.mas_centerY).offset(0);
        make.height.width.mas_equalTo(150);
    }];
    
    
    
    BaseLab *labName = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, 1, 1) text:kUSER_INFO_MANAGER.nickName font:30 textColor:[UIColor whiteColor] isBold:nil numberOfLines:1];
    labName.font = [UIFont fontWithName:@"PingFangSC-Medium" size:30];
    labName.textAlignment = NSTextAlignmentCenter ;
    labName.backgroundColor = [UIColor clearColor];
    [self.view addSubview:labName];
    [labName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(userImage.mas_bottom).offset(15);
        make.centerX.equalTo(self.view.mas_centerX).offset(0);
    }];
    
    
    
    BaseLab *lab1 = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, 1, 1) text:@"更专业的创作" font:30 textColor:[UIColor whiteColor] isBold:nil numberOfLines:1];
    lab1.font = [UIFont fontWithName:@"PingFangSC-Medium" size:17];
    lab1.textAlignment = NSTextAlignmentCenter ;
    lab1.textColor = [UIColor blackColor];

    [self.view addSubview:lab1];
    [lab1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(viewBack.mas_bottom).offset(40);
        make.centerX.equalTo(self.view.mas_centerX).offset(0);
    }];
    
    BaseLab *lab2 = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, 1, 1) text:@"editor.pre.ztime365.com" font:30 textColor:[UIColor whiteColor] isBold:nil numberOfLines:1];
    lab2.font = [UIFont fontWithName:@"PingFangSC-Medium" size:26];
    lab2.textAlignment = NSTextAlignmentCenter ;
    lab2.textColor = baseColorTheme;
    [[lab2 addTag]subscribeNext:^(id  _Nullable x) {
        UIPasteboard *pab = [UIPasteboard generalPasteboard];
        NSString *string = lab2.text;
        [pab setString:string];
        if (pab == nil) {
            [Tools showTips:@"复制失败"];
            
        }else{
            [Tools showTips:@"已复制,请在电脑端打开"];
        }
    }];
    
   

    [self.view addSubview:lab2];
    [lab2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(lab1.mas_bottom).offset(10);
        make.centerX.equalTo(self.view.mas_centerX).offset(0);
    }];
    
    BaseLab *lab3 = [[BaseLab alloc]initializeFrame:CGRectMake(0, 0, 1, 1) text:@"请在电脑上使用" font:30 textColor:[UIColor whiteColor] isBold:nil numberOfLines:1];
    lab3.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:12];
    lab3.textAlignment = NSTextAlignmentCenter ;
    lab3.textColor = [UIColor blackColor];

    [self.view addSubview:lab3];
    [lab3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(lab2.mas_bottom).offset(16);
        make.centerX.equalTo(self.view.mas_centerX).offset(0);
    }];
}


@end
